package run.halo.app.model.enums;

/**
 * Log type.
 *
 * @author johnniang
 */
public enum UserRoleStatusEnum implements ValueEnum<Integer> {

    /**
     * COMMON
     */
    COMMON(0),

    /**
     * ADMIN
     */
    ADMIN(1);

    private final Integer value;

    UserRoleStatusEnum(Integer value) {
        this.value = value;
    }


    @Override
    public Integer getValue() {
        return value;
    }

    public static UserRoleStatusEnum getByCode(Integer code) {
        for (UserRoleStatusEnum e : values()) {
            if (e.getValue().equals(code)) {
                return e;
            }
        }
        return null;
    }


}
